using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace Xbox360Game1 {
    public class Game1 : Microsoft.Xna.Framework.Game {
        Color backgroundColor = Color.CornflowerBlue;
        GraphicsDeviceManager graphics;
        SpriteBatch spriteBatch;
        GamePadState currentGamePadState;
        GamePadState previousGamePadState;
        SpriteFont menuFont;
        SoundEffect clickSound;
        Random random;
        bool menu;

        public Game1() {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
        }

        protected override void Initialize() {
            menu = true;
            base.Initialize();
        }

        protected override void LoadContent() {
            spriteBatch = new SpriteBatch(GraphicsDevice);
            menuFont = Content.Load<SpriteFont>("menu");
        }

        protected override void UnloadContent() {
        }

        protected override void Update(GameTime gameTime) {
            //if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) this.Exit();
            if(menu) {
                updateMenu(gameTime);
            }
            else {
                updateGame(gameTime);
            }

            base.Update(gameTime);
        }

        public void updateMenu(GameTime gameTime) {

        }

        public void updateGame(GameTime gameTime) {

        }

        protected override void Draw(GameTime gameTime) {
            GraphicsDevice.Clear(backgroundColor);

            spriteBatch.Begin();

            spriteBatch.DrawString(menuFont, "Start Game", new Vector2( GraphicsDevice.Viewport.Width * 0.4f, GraphicsDevice.Viewport.Height * 0.4f), Color.Black);
            spriteBatch.End();

            base.Draw(gameTime);
        }
    }
}
